/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package imagetest;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 *
 * @author Staff
 */
public class ModifiableImageTestFrame extends javax.swing.JFrame {
    private BananaPanel p = new BananaPanel();
    /**
     * Creates new form ImageTestFrame
     */
    public ModifiableImageTestFrame() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
        setContentPane(p);
        bananaButton = new javax.swing.JButton();
        
        bananaButton.addActionListener(new ActionListener() { 
            public void actionPerformed(ActionEvent e) { 
                p.toggleBanana();
            } 
         } );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        bananaButton.setText("toggle pineapple");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(150, 150, 150)
                .addComponent(bananaButton)
                .addContainerGap(177, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(257, Short.MAX_VALUE)
                .addComponent(bananaButton)
                .addGap(20, 20, 20))
        );

        pack();
    }// </editor-fold>

    /**
     * @param args the command line arguments
     */
    // Variables declaration - do not modify
    private javax.swing.JButton bananaButton;
    // End of variables declaration
}
